package cn.liutao.dish.entity.po;

import cn.liutao.common.entity.BaseEntity;
import cn.liutao.common.entity.Validation;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 餐桌表 实体类。
 *
 * @author liutao
 * @since 2023-11-01
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "dining_table")
public class DiningTable extends BaseEntity implements Serializable {

    @Id(keyType = KeyType.Auto)
    @NotNull(message = "请选择餐桌",groups = Validation.EditGroup.class)
    private Integer id;

    /**
     * 餐桌名称
     */
    @NotBlank(message = "餐桌名称不能为空",groups = Validation.AddGroup.class)
    private String name;

    /**
     * 餐桌可坐总人数
     */
    @NotNull(message = "总人数不能为空",groups = Validation.AddGroup.class)
    private Integer totalQuantity;

    /**
     * 已坐总人数
     */
    private Integer usedQuantity;

    /**
     * 二维码图片（用于扫码点餐）
     */
    private String img;

    /**
     * 启用状态：0禁用，1启用
     */
    private Integer status;

}
